<?php

require_once 'Zend/Form/Element/Text.php';

class ZFKiller_Form_Element_Text extends Zend_Form_Element_Text {

	public function __construct($spec, $options = null) {
		ZFKiller_Form_Element::formatDefaultOptions($spec, $options);
		parent::__construct($spec, $options);
		ZFKiller_Form_Element::formatElementAsText($this);
	}

	public function setMaxlength($maxlength) {
		$this->setAttrib('maxlength', $maxlength)
				->addValidators(array(
					array('stringLength', false, array(0, $maxlength)),
				));
		return $this;
	}

}